#include <iostream>
using namespace std;
const int BUFFER_SIZE = 32;
/*无参构造函数想要调用有参构造函数必须使用初始化列表*/
class Person
{
public:
#if 1
    Person()
    {
        cout << "父类无参构造\n";
    }
#endif
    ~Person()
    {
        cout << "父类析构函数\n";
    }
    Person(int age) : m_age(age)
    {
        cout << "父类带参构造\n";
    }
    virtual void makeMoney()
    {
        cout << "person makemoney\n";
    }

public:
    int m_age;
};
class Student : public Person
{
public:
    Student()
    {
        cout << "子类无参构造\n";
    }
    ~Student()
    {
        cout << "子类析构函数\n";
    }
    void makeMoney()
    {
        cout << "student makemoney\n";
    }

public:
    int m_no;
};
int main()
{
    Student stu;
    Person per;
    int len = sizeof(stu);
    int len1 = sizeof(per);
    cout << len << endl;
    cout << len1 << endl;
    return 0;
}